:root {
    font-size: 15px;
    --body-width: 480px;
    --card-width: 420px;
    --card-height: 280px;
    --img-height: 226px;
    --img-height-expanded: 320px;
    background-color: #333;
}

body {
    width: var(--body-width);
    height: 100vh;
    background-color: #eee;
    margin: auto;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 1rem 0;
}
body.no-scroll {
    overflow: hidden;
}
.card {
    width: var(--card-width);
    height: var(--card-height);
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.2rem 2rem rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
    transition: .3s all cubic-bezier(0,1,0.95,1.05);
}
.card img {
    display: block;
    width: 100%;
    height: var(--img-height);
    object-fit: cover;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.card h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 0.8rem 1.2rem;
    background-color: #fff;
    line-height: 2rem;
    letter-spacing: -0.5px;
    padding-bottom: 0;
}

.card .content-wrap {
    height: 0;
    overflow: hidden;
    transition : .3s all ease-out;
    opacity: .8;
}

.card .content-wrap .content {
    padding: 0 1.2rem;
    background-color: #fff;
    overflow: auto;
}
.card p {
    font-size: 1.2rem;
    line-height: 1.5rem;
}

.card.active {
    transform-origin: 50% 0;
    border-radius: 0;
    transform: translateY(var(--card-top)) scale(calc(480 / 420));
}
.card.active h4{
    padding-bottom: .8rem;
}

.card.active img {
    border-radius: 0;
    height: var(--img-height-expanded);
}
.card.card.active .content-wrap{
    height: 100vh;

}

.card.active .content-wrap{
    height: 100vh;
    transition: .3s all ease-in;
    opacity: 1;
} 
